package com.company.demo;

import com.company.demo.controller.DeductionFacade;
import com.company.demo.pojo.WxBlance;
import com.company.demo.pojo.WxTrade;

import java.math.BigDecimal;

/**
 * 调用客户端
 */
public class Client {

    public static void main(String[] args) {
        WxTrade wxTrade = new WxTrade();
        wxTrade.setTradeAmout(new BigDecimal("1000"));

        WxBlance wxBlance = new WxBlance();
        wxBlance.setBlance(new BigDecimal("999"));

        DeductionFacade.deduct(wxBlance,wxTrade);

        System.out.println(wxTrade.getUserAmout());
        System.out.println(wxBlance.getBlance());
    }
}
